-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COMMON] Replace NodeInfo with Broker #1763
[COMMON] Replace NodeInfo with Broker #1763
Conversation
# Conflicts: # app/src/main/java/org/astraea/app/backup/Backup.java # app/src/main/java/org/astraea/app/web/ReassignmentHandler.java # app/src/main/java/org/astraea/app/web/SkewedPartitionScenario.java # common/src/test/java/org/astraea/common/cost/ReplicaLeaderCostTest.java # common/src/test/java/org/astraea/common/partitioner/StrictCostPartitionerPerfTest.java
請問一下這個方法的用途?如果是從Admin來建立的話應該是可以建立完整的資訊? |
# Conflicts: # common/src/main/java/org/astraea/common/cost/utils/ClusterInfoSensor.java
目前情境是當 |
# Conflicts: # app/src/test/java/org/astraea/app/web/BalancerHandlerTest.java
麻煩修正一下衝突,以及標題名稱修改一下 |
標題名稱要加讓 [COMMON] |
common/src/main/java/org/astraea/common/admin/ConsumerGroup.java
Outdated
Show resolved
Hide resolved
# Conflicts: # app/src/main/java/org/astraea/app/web/WebService.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -186,12 +186,13 @@ public static byte[] toBytes(BeanObject value) { | |||
return beanBuilder.build().toByteArray(); | |||
} | |||
|
|||
// TODO: Due to the change of NodeInfo to Broker. This and the test should be updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所以這個有後續追蹤的議題 or PR 嗎??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1721 嗎?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的
related to #1721
主要改動
將
NodeInfo
移除,改由Broker
物件取代NodeInfo.of(int id, String host, int port)
->Broker.of(int id, String host, int port)
NodeInfo.of(org.apache.kafka.common.Node node)
->Broker.of(org.apache.kafka.common.Node node)
修改
Broker
相關改動
Admin.nodeInfos()
->Admin.brokers()
Replica.nodeInfo()
->Replica.broker()
TODO
若此 pr 可以合併將在 #1721 完成下述:
修改
toBytes(ClusterInfo value)
修改
readClusterInfo(byte[] bytes)
因序列化格式須修改,測試先暫時移除